var fs = require('fs');

var path = './test.data';
var content = 'this is amp fs test file';

// 写文件
fs.writeSync(path, content);

// 读文件
var data = fs.readSync(path);
console.log('fs read: ' + data);

fs.unlinkSync(path);


console.log('system version is: ' + system.version());
console.log('module version is: ' + system.versions().module);
console.log('system platform is: ' + system.platform());
console.log('system uptime is: ' + system.uptime());
// get heap/memory information
console.log('system heapTotal is: ' + system.memory().heapTotal);
console.log('system heapUsed is: ' + system.memory().heapUsed);



var kv = require('kv');

var key = 'key-test';
var value = 'this is amp kv test file';

// 设置kv
kv.setStorageSync(key, value);

// 获取kv
var val = kv.getStorageSync(key);
console.log('kv read: ' + val);

// kv remove
kv.removeStorageSync(key);